/* eslint-disable */
// @ts-ignore
import request from '@/utils/request';
import { CustomRequestOptions } from '@/interceptors/request';

import * as API from './types';

/** 用户积分新增 POST /api/point/add */
export async function addUsingPost1({
  body,
  options,
}: {
  body: API.yonghujifenchuangjiancanshu;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultobject>('/api/point/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 用户积分删除 POST /api/point/del */
export async function delUsingPost1({
  body,
  options,
}: {
  body: API.IDcanshu;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultobject>('/api/point/del', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 用户积分详情 GET /api/point/detail */
export async function detailUsingGet4({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.detailUsingGET4Params;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultyonghujifenxiangqingVo>('/api/point/detail', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 用户积分编辑 POST /api/point/edit */
export async function editUsingPost1({
  body,
  options,
}: {
  body: API.yonghujifengengxincanshu;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultobject>('/api/point/edit', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 用户积分列表 GET /api/point/list */
export async function listUsingGet5({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.listUsingGET5Params;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultPageResultyonghujifenliebiaoVo>(
    '/api/point/list',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}
